<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>附件管理</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document).ready(function() {

	});
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/ta/stWeihu/">附件列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="stWeihu"
		action="${ctx}/ta/stWeihu/" method="post"
		class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
		<input id="pageSize" name="pageSize" type="hidden"
			value="${page.pageSize}" />
		<ul class="ul-form">
			<li><label>编号：</label> <form:input path="编号" htmlEscape="false"
					maxlength="19" class="input-medium" /></li>
			<li><label>业务类型：</label> <select name="业务类型"
				class="input-medium">
					<option value="">全部业务</option>
					<c:forEach items="${ls}" var="ls">
						<option value="${ls}">${ls}</option>
					</c:forEach>
			</select></li>
			<li><label>申请单位：</label> <form:input path="申请单位"
					htmlEscape="false" maxlength="512" class="input-medium" /></li>
			<li><label>优先级：</label> <select name="优先级" class="input-medium">
					<option value="">全部事件</option>
					<option value="0">普通事件</option>
					<option value="1">加急事件</option>
					<option value="2">特急事件</option>
			</select></li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary"
				type="submit" value="查询" /></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}" />
	<table id="contentTable"
		class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>编号</th>
				<th>业务类型</th>
				<th>申请单位</th>
				<th>附件总数</th>
				<th>接件时间</th>
				<th>优先级</th>
				<th>联系人</th>
				<shiro:hasPermission name="ta:stWeihu:edit">
					<th>操作</th>
				</shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="stWeihu">
				<tr>
					<td>${stWeihu.编号}</td>
					<td>${stWeihu.业务类型}</td>
					<td>${stWeihu.申请单位}</td>
					<td>${stWeihu.附件总数}</td>
					<td><fmt:formatDate value="${stWeihu.接件时间}"
							pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><c:if test="${stWeihu.优先级== 0}">
							<span style="color: blue">普通件</span>
						</c:if> <c:if test="${stWeihu.优先级== 1}">
							<span style="color: yellow">加急件</span>
						</c:if> <c:if test="${stWeihu.优先级== 2}">
							<span style="color: red">特急件</span>
						</c:if></td>
					<td>${stWeihu.联系人}</td>
					<shiro:hasPermission name="ta:stWeihu:edit">
						<td><a href="${ctx}/ta/stWeihu/selectInfo?iid=${stWeihu.编号}">详情</a>
							<a href="${ctx}/ta/stDynamicResource/delAll?iid=${stWeihu.编号}"
							onclick="return confirmx('确认要删除该附件吗？', this.href)">删除所有附件</a></td>
					</shiro:hasPermission>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>